<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/tools.1.js"></script>
		<script>
			function $$(id){
				return document.getElementById(id)
			}
			window.onload=function(){
				var cnv=$$("canvas")
				var cxt=cnv.getContext("2d")
				
				var txt=$$("txt")
				var mouse=tools.getMouse(cnv)
				
				cnv.addEventListener("mousemove",function(){
					txt.innerHTML="鼠标指针坐标:("+mouse.x+","+mouse.y+")"
				},false)
			}
		</script>
	</head>
	<body>
		<canvas id="canvas"width="200"height="150"style="border: 1px dashed gray;"></canvas>
		<p id="txt"></p>
	</body>
</html>
